package com.example.lenovo.qm;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class Third extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_third);
    } public void onMyClick(View v) {
        ProgressDialog mProgressDialog = new ProgressDialog(this,R.style.Theme_AppCompat);
        mProgressDialog.setCanceledOnTouchOutside(false);
        mProgressDialog.show();
        View view = LayoutInflater.from(this).inflate(R.layout.my_process,null);
        ImageView animImage = view.findViewById(R.id.animImage);
        Animation animationProgress = AnimationUtils.loadAnimation(this, R.anim.process);
        animImage.startAnimation(animationProgress);
        TextView textView = view.findViewById(R.id.tvTip);
        textView.setText("IsLoading...");
        mProgressDialog.setContentView(view);
    }
}
